package com.tengju.data.domain.model.wx;

import com.tengju.data.domain.model.user.StarLevelEnum;
import com.tengju.data.domain.model.user.UserIdCode;
import com.tengju.data.domain.shared.IdObject;
import com.tengju.data.domain.shared.tree.TreeData;

import java.util.List;

/**
 * @author: 李大仙
 * @date: 2021/11/3 7:36 下午
 */
public class WxUserInfo implements TreeData {

    private UserIdCode idCode;
    private Long departmentId;
    private UserIdCode dominationIdCode;
    private UserIdCode historyDominationIdCode;
    private WxActivateStatus wxActivateStatus;
    private StarLevelEnum starLevel;
    private List<Long> tagIdList;

    public UserIdCode getIdCode() {
        return idCode;
    }

    public Long getDepartmentId() {
        return departmentId;
    }

    public UserIdCode getDominationIdCode() {
        return dominationIdCode;
    }

    public UserIdCode getHistoryDominationIdCode() {
        return historyDominationIdCode;
    }

    public WxActivateStatus getWxActivateStatus() {
        return wxActivateStatus;
    }

    public StarLevelEnum getStarLevel() {
        return starLevel;
    }

    public List<Long> getTagIdList() {
        return tagIdList;
    }

    private WxUserInfo() {
    }

    public WxUserInfo(UserIdCode idCode, Long departmentId, UserIdCode dominationIdCode, UserIdCode historyDominationIdCode, WxActivateStatus wxActivateStatus, StarLevelEnum starLevel, List<Long> tagIdList) {
        this.idCode = idCode;
        this.departmentId = departmentId;
        this.dominationIdCode = dominationIdCode;
        this.historyDominationIdCode = historyDominationIdCode;
        this.wxActivateStatus = wxActivateStatus;
        this.starLevel = starLevel;
        this.tagIdList = tagIdList;
    }

    public static WxUserInfo of(long idCode,
                                long departmentId,
                                long dominationIdCode,
                                long historyDominationIdCode,
                                WxActivateStatus wxActivateStatus,
                                StarLevelEnum starLevel,
                                List<Long> tagIdList) {
        return new WxUserInfo(UserIdCode.of(idCode),
                departmentId,
                UserIdCode.of(dominationIdCode),
                UserIdCode.of(historyDominationIdCode),
                wxActivateStatus,
                starLevel,
                tagIdList);

    }

    @Override
    public IdObject getId() {
        return this.idCode;
    }

    public void setWxActivateStatus(WxActivateStatus wxActivateStatus) {
        this.wxActivateStatus = wxActivateStatus;
    }

    public void setTagIdList(List<Long> tagIdList) {
        this.tagIdList = tagIdList;
    }

    public void setHistoryDominationIdCode(UserIdCode historyDominationIdCode) {
        this.historyDominationIdCode = historyDominationIdCode;
    }

    public void setStarLevel(StarLevelEnum starLevel) {
        this.starLevel = starLevel;
    }
}
